package com.jt.proxy;

import org.springframework.cglib.proxy.Enhancer;

public class CGlibProxy {
    public static Object getProxy(Object target) {
        //1.创建增强器对象
        Enhancer enhancer = new Enhancer();
        //2.设定父级 目标对象
        enhancer.setSuperclass(target.getClass());
        //3.定义回调方法  dialing对象执行目标方法时调用
        enhancer.setCallback(getmenthodinterceptor(target));
        //4.获取接口
        class[]Class<?>[] interfaces = target.getClass().getInterfaces();
    }
}
